home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-06-25 | 1.8 KB | 78 lines | [TEXT/CWIE] |
- // =================================================================================
- // CTextView.cp ©1996-1998 Metrowerks Inc. All rights reserved.
- // =================================================================================
-
- #include <LStream.h>
-
- #include "CTextView.h"
-
-
- // ---------------------------------------------------------------------------------
- // • CTextView(LStream*)
- // ---------------------------------------------------------------------------------
-
- CTextView::CTextView(
- PP_PowerPlant::LStream *inStream )
- : LTextEditView( inStream )
- {
- mIsDirty = false;
- }
-
-
- CTextView::~CTextView()
- {
- }
-
- // ---------------------------------------------------------------------------------
- // • UserChangedText
- // ---------------------------------------------------------------------------------
-
- void
- CTextView::UserChangedText()
- {
- if ( !IsDirty() ) {
-
- // Set the update menus flag.
- SetUpdateCommandStatus( true );
-
- // Set the dirty flag.
- SetDirty( true );
-
- }
- }
-
-
- // ---------------------------------------------------------------------------------
- // • SavePlace
- // ---------------------------------------------------------------------------------
-
- void
- CTextView::SavePlace(
- PP_PowerPlant::LStream *outPlace )
- {
- // Call inherited.
- LTextEditView::SavePlace( outPlace );
-
- // Save the image size.
- outPlace->WriteData( &mImageSize, sizeof(PP_PowerPlant::SDimension32) );
- }
-
-
- // ---------------------------------------------------------------------------------
- // • RestorePlace
- // ---------------------------------------------------------------------------------
-
- void
- CTextView::RestorePlace(
- PP_PowerPlant::LStream *inPlace )
- {
- // Call inherited.
- LTextEditView::RestorePlace( inPlace );
-
- // Restore the image size.
- inPlace->ReadData( &mImageSize, sizeof(PP_PowerPlant::SDimension32) );
-
- // Realign the text edit rects.
- AlignTextEditRects();
- }
-